package com.qf.shixi.exception;

import com.qf.shixi.result.ResponseCode;

public class BusinessException extends RuntimeException {

    private String code;

    private String info;

    public BusinessException(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public BusinessException(ResponseCode responseCode) {
        this.code = responseCode.getCode();
        this.info = responseCode.getMessage();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }
}
